1. Field of the Invention
The present invention relates to communications over computer networks and more particularly to systems and methods for establishing quasi-persistent HTTP connections over a computer network.
2. Related Art
Hyper-text transfer protocol (HTTP) is a well-known application layer protocol that typically operates on top of Transmission Control Protocol (TCP), which is a well-known transport layer protocol. HTTP allows client computers to communicate with server computers over a computer network. As used herein, the terms client (or client computer) and server (or server computer) are relative. A client is an entity that is making a request to a server which typically responds to the client's request. Thus any computer may act as both a client and a server.
Today, version 1.0 of the HTTP protocol (HTTP 1.0) is the most widely used HTTP protocol. HTTP 1.0 is based on a request-response paradigm. The request-response paradigm can be characterized by four-stages: connection, client request, server response, and connection termination. HTTP is a stateless protocol since it does not maintain a connection after the four-stage process has taken place.
In the connection stage, a client attempts to connect to a port on the server. Typically, port 80 on the server is used for HTTP connections. If a connection is established, the server sends a response to the client that indicates that a connection has been established. In the client request stage, the client generates a HTTP request. Common HTTP requests include GET requests and POST requests. A GET request requests the server to send data (e.g., a web page or any other type of data) to the client. A POST request allows the client to send data (e.g., a HTML form or any other type of data) to the server. A POST request may, for example, cause the server to execute an external application or a CGI script to handle the data being posted by a HTML form. In the server response stage, the server generates a HTTP response. The response will differ depending on the type of HTTP request that was received from the client. In the connection termination stage, the connection between the server and the client is terminated.
The four-stage connection, client request, server response, connection termination process occurs each time a client has new data to request from the server or send to the server using HTTP 1.0. As a result, communications using HTTP 1.0 can be very slow since a new connection is established and then terminated each time a client generates a new request. This is especially true in situations where HTTP 1.0 is being used to transfer data in real-time between client and server computer such as during a data conference. Consequently, the delays caused by repeatedly performing the four-stage process impose a serious limitation to real-time data transfers using HTTP 1.0.
One technique that has been developed to address this limitation places a “Keep-Alive” header within a response or a request. The Keep-Alive header, which is not defined by HTTP 1.0, indicates that the connection should not be terminated until the client or the server decides to terminate the connection. The client and server can then send data between one another without having to perform the time consuming four-stage process.
Although the Keep-Alive technique provides a persistent connection, there are several problems associated with the Keep-Alive technique. First, many clients and servers do not support the Keep-Alive technique. As such, there is no guarantee that the Keep-Alive technique will work with clients and servers that exist today. Second, the Keep-Alive technique can be unstable. For example, Keep-Alive connections between a client and a server can be unexpectedly terminated. Third, clients and servers are often separated from outside networks by firewalls that prevent Keep-Alive connections from being established or unexpectedly close the Keep-Alive connections after they are established. The firewalls may be implemented on proxy servers that act as an interface between clients and servers and external computer networks such as the Internet.
Accordingly, what is needed are systems and methods for creating quasi-persistent HTTP connections that overcome the limitations described above.